Imports System.Collections.Generic
Imports System.Text
Imports System.Windows.Forms
Imports System

Namespace DgvFilterPopup



    ''' <summary>
    ''' Represents the method that will handle an event related to a column filter.
    ''' </summary>
    ''' <param name="sender">The source of the event.</param>
    ''' <param name="e">The <see cref="ColumnFilterEventArgs"/> instance containing the event data.</param>
    Public Delegate Sub ColumnFilterEventHandler(sender As Object, e As ColumnFilterEventArgs)


    ''' <summary>
    ''' Provides data for a column filter event. 
    ''' </summary>
    Public Class ColumnFilterEventArgs
        Inherits EventArgs


#Region "PRIVATE FIELDS"

        Private mColumn As DataGridViewColumn
        Private mColumnFilter As DgvBaseColumnFilter
        Private mHandled As Boolean


#End Region


#Region "PROPERTIES"


        ''' <summary>
        ''' Gets the DataGridView column involved in the event.
        ''' </summary>
        Public ReadOnly Property Column() As DataGridViewColumn
            Get
                Return mColumn
            End Get
        End Property


        ''' <summary>
        ''' Gets or sets the column filter instance.
        ''' </summary>
        ''' <value>A column filter instance.</value>
        Public Property ColumnFilter() As DgvBaseColumnFilter
            Get
                Return mColumnFilter
            End Get
            Set(value As DgvBaseColumnFilter)
                mColumnFilter = value
            End Set
        End Property

        ''' <summary>
        ''' Gets or sets a value indicating whether this <see cref="ColumnFilterEventArgs"/> is handled.
        ''' </summary>
        ''' <value><c>true</c> if handled; otherwise, <c>false</c>.</value>
        Public Property Handled() As Boolean
            Get
                Return mHandled
            End Get
            Set(value As Boolean)
                mHandled = value
            End Set
        End Property

#End Region

        ''' <summary>
        ''' Initializes a new instance of the <see cref="ColumnFilterEventArgs"/> class.
        ''' </summary>
        ''' <param name="Column">The DstaGridView column.</param>
        ''' <param name="ColumnFilter">The column filter instance.</param>
        Public Sub New(Column As DataGridViewColumn, ColumnFilter As DgvBaseColumnFilter)
            Me.mColumn = Column
            Me.mColumnFilter = ColumnFilter
            Me.mHandled = Handled
        End Sub
    End Class
End Namespace
